<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /**
         * 选择结构
         * if...else
         * switch
         */ 


         /**
          * 循环结构
          * while 
          * do...while
          * for
          * for...of
          * for...in
          */ 
        var str = 'hello world'
 
        // var i = 0
        // while(i<str.length){
        //     console.log(str[i])
        //     i++
        // }

        // for(var s of str){
        //     console.log(s)
        // }

        for(var i in str){
            console.log(i, str[i])
        }

    </script>
</head>
<body>
    
</body>
</html>